﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Gqq.CSharpindepth2.Common
{
    public class CircleDrawing : IDrawing
    {
        private IEnumerable<Circle> cirs;

        public CircleDrawing()
        {
            List<Circle> lcirs = new List<Circle>();
            lcirs.Add(new Circle("circle1"));
            lcirs.Add(new Circle("circle2"));
            lcirs.Add(new Circle("circle3"));
            lcirs.Add(new Circle("circle4"));
            cirs = lcirs.AsEnumerable();
        }

        /// <summary>
        /// 虽然Circle是继承于IShape的，但是这里.net 3.5不支持协变，
        /// </summary>
        public IEnumerable<IShape> Shapes
        {
            get { return cirs; }
        }
    }
}
